gusucode.com > 忠网网站广告管理系统 ZonGG V1.3 > 忠网网站广告管理系统 ZonGG V1.3\code\GGadminXiu.asp
<!-- #INCLUDE FILE="login.asp" --> <head> <meta http-equiv="Content-Language" content="zh-cn"> </head> <% '///****************************************************************** ' 修改管理员信息 文件名:GGadminXiu.asp '******************************************************************/// Call AdminQx(1,"") '' 判断权限 action=trim(request("action")) Dim dqw Select Case action Case "ruku" dqw="修改管理员信息 -- 验证有效性" Call Heads_GGadmin(dqw) call adminxiu_ruku() Case else dqw="修改管理员信息 -- 请输入有效管理信息" Call Heads_GGadmin(dqw) Call adminxiu_main() end Select '//************************************************ ' 修改管理员入库 '************************************************// Sub adminxiu_ruku() if trim(request("id"))<>"" then id = trim(request("id")) if isnumeric(id) then if Len(trim(request("admin")))<1 or Len(trim(request("passwd")))<1 or Len(trim(request("person")))<1 then '' 简易判断是否为空 response.write "<table width=580 border=1 cellpadding=0 bordercolor=#C0C0C0 bgcolor=#ffffff height=200 style='border-collapse: collapse'><tr><td align=center>请输入管理员各项内容后进行修改<BR><BR>"&Go_back&"</td></tr></table>" else rs.open "select count(*) from admin where admin='"&trim(request("admin"))&"' and aid<>"&id,conn,1,1 '' 判断管理帐号是否已存在 if rs(0)>0 then response.write "<table width=580 border=1 cellpadding=0 bordercolor=#C0C0C0 bgcolor=#ffffff height=200 style='border-collapse: collapse'><tr><td align=center>您输入的帐号已存在,请返回输入有效的管理帐号<BR><BR>"&Go_back&"</a></td></tr></table>" else '' 权限标识组织 '' 分割模式: 管理员设置,广告图管理,分类进行管理类型#分类1,分类2,分类3,... Dim qxbs:qxbs="" qxbs=trim(request("qx1"))&","&trim(request("qx2"))&","&trim(request("qx3")) if trim(request("qx3"))="2" then classids=replace(replace(replace(trim(request("class"))," ",""),"x,",""),"x","") if classids="" then response.write "<table width=580 border=1 cellpadding=0 bordercolor=#C0C0C0 bgcolor=#ffffff height=200 style='border-collapse: collapse'><tr><td align=center>您选择有效的广告位分类<BR><BR>"&Go_back&"</a></td></tr></table>" response.end end if qxbs=qxbs&"#"&classids else qxbs=qxbs&"#"&"all" end if conn.execute("Update Admin set admin='"&trim(request("admin"))&"',passwd='"&trim(request("passwd"))&"',power='"&qxbs&"',person='"&request("person")&"' where aid="&id) response.write "<table width=580 border=1 cellpadding=0 bordercolor=#C0C0C0 bgcolor=#ffffff height=200 style='border-collapse: collapse'><tr><td align=center>修改管理员信息成功!<BR><BR><a href='?id="&id&"'>[查看结果]</a> <a href='GGadmins.asp'>[查看全部已有]</a></td></tr></table>" end if rs.close end if end if end if End Sub '//************************************************ ' 修改管理员显示 '************************************************// Sub adminxiu_main() if trim(request("id"))<>"" then id = trim(request("id")) if isnumeric(id) then Rs.open "select * from Admin where aid="&cint(id),conn,1,1 Dim qxbs,pids qxbs=PubFgdy(rs(3),"#",0) pids=PubFgdy(rs(3),"#",1) %><div align="center"> <table width="680" id="table1" border=1 cellpadding=2 bordercolor=#C0C0C0 bgcolor=#ffffff style="border-collapse: collapse"> <form method="POST" action="?action=ruku&id=<%=rs(0)%>"> <tr> <td class="td1" height="30" align="center" width="130">管理帐号</td> <td class="td1" height="30"> <input type="text" name="admin" size="16" maxlength="20" value="<%=rs(1)%>"> 20字符以内</td> <td class="td1" height="30" align="center" width="300">所有权限 <a href="javascript:opw('ZonGG.asp?a=Help.asp','ZonGG',800,600)">[权限说明]</a></td> </tr> <tr> <td align="center" width="130"> 登陆密码</td> <td> <input type="text" name="passwd" size="12" maxlength="20" value="<%=rs(2)%>"> 20字符以内</td> <td rowspan="2" valign="top"> <input type="checkbox" name="qx1" value="1" <%if PubFgdy(qxbs,",",0)="1" then response.write "checked"%>>管理员设置 <input type="checkbox" name="qx2" value="1" <%if PubFgdy(qxbs,",",1)="1" then response.write "checked"%>>广告图管理 <br><br> <select size="1" name="qx3" style="line-height: 200%"> <option value="0" <%if PubFgdy(qxbs,",",2)="0" then response.write "selected"%>> -- 请选择对分类进行管理的类型/不选说明没有</option> <option value="1" <%if PubFgdy(qxbs,",",2)="1" then response.write "selected"%>>1、分类/广告位总管 含添加删除分类</option> <option value="2" <%if PubFgdy(qxbs,",",2)="2" then response.write "selected"%>>2、对下列选中分类拥有更新、清理权限</option> </select> <br> <% Response.write "<select name=class size=7 multiple>" response.write "<option value='x'>--------- 请选择权限所属分类 可多选 ---------</option>" Set RsLs=Server.CreateObject("ADODB.Recordset") '开始广告分类循环 RsLs.Open "select cid,cname from class ",conn,1,1 do while not RsLs.eof response.write "<option value='"&RsLs(0)&"'" if instr(","&pids&",",","&RsLs(0)&",")>0 then response.write "selected" response.write ">"&RsLs(1)&"</option>" RsLs.movenext loop RsLs.Close Set RsLs=Nothing Response.write "</select>" %> </td> </tr> <tr> <td align="center" width="130"> 个人资料</td> <td> <textarea rows="9" name="person" cols="33"><%=rs(4)%></textarea></td> </tr> <tr> <td colspan="3" height="40"> <p align="center"> <input type="submit" value="确定修改管理员信息" name="B1"></td> </tr></form> <tr> <td align="center" colspan="3" height="30" class="td1"><font class=red>注:</font>各项内容不可为空,管理帐号不要与已有帐号重复</td> </tr> </table> </div> <% end if end if End Sub %>